package cn.iocoder.yudao.module.infra.asr;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@ConfigurationProperties(prefix = "asr")
@Data
public class AsrConfig {
    private String primary;
    private Map<String, Config> services;

    public Config getService(String name) {
        return services.get(name);
    }

    public Config getPrimaryService() {
        return services.get(primary);
    }

    @Data
    public static class Config {
        private String appid;
        private String token;
        private String cluster;
    }
}
